﻿import request from '/@/utils/request';
enum Api {
  AddDevicePointsValueHistory = '/api/devicePointsValueHistory/add',
  DeleteDevicePointsValueHistory = '/api/devicePointsValueHistory/delete',
  UpdateDevicePointsValueHistory = '/api/devicePointsValueHistory/update',
  PageDevicePointsValueHistory = '/api/devicePointsValueHistory/page',
  DetailDevicePointsValueHistory = '/api/devicePointsValueHistory/detail',
  GetDeviceInfoDeviceInfoIdDropdown = '/api/devicePointsValueHistory/DeviceInfoDeviceInfoIdDropdown',
  GetDeviceSlaveTemplatePointsDeviceSlaveTemplatePointsIdDropdown = '/api/devicePointsValueHistory/DeviceSlaveTemplatePointsDeviceSlaveTemplatePointsIdDropdown',
}

// 增加变量历史值
export const addDevicePointsValueHistory = (params?: any) =>
	request({
		url: Api.AddDevicePointsValueHistory,
		method: 'post',
		data: params,
	});

// 删除变量历史值
export const deleteDevicePointsValueHistory = (params?: any) => 
	request({
			url: Api.DeleteDevicePointsValueHistory,
			method: 'post',
			data: params,
		});

// 编辑变量历史值
export const updateDevicePointsValueHistory = (params?: any) => 
	request({
			url: Api.UpdateDevicePointsValueHistory,
			method: 'post',
			data: params,
		});

// 分页查询变量历史值
export const pageDevicePointsValueHistory = (params?: any) => 
	request({
			url: Api.PageDevicePointsValueHistory,
			method: 'post',
			data: params,
		});

// 详情变量历史值
export const detailDevicePointsValueHistory = (id: any) => 
	request({
			url: Api.DetailDevicePointsValueHistory,
			method: 'get',
			data: { id },
		});

export const getDeviceInfoDeviceInfoIdDropdown = () =>
		request({
		url: Api.GetDeviceInfoDeviceInfoIdDropdown,
		method: 'get'
		});
export const getDeviceSlaveTemplatePointsDeviceSlaveTemplatePointsIdDropdown = () =>
		request({
		url: Api.GetDeviceSlaveTemplatePointsDeviceSlaveTemplatePointsIdDropdown,
		method: 'get'
		});

